package com.haidechizi.i18n.code.generator.common.message.key;

import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;

public class KeyGeneratorFactory {

    private static final Map<String, KeyGenerator> keyGeneratorMap = new ConcurrentHashMap<>();

    public static final void addKeyGenerator(String name, KeyGenerator keyGenerator) {
        keyGeneratorMap.put(name, keyGenerator);
    }

    public static final KeyGenerator getKeyGenerator(String name) {
        return keyGeneratorMap.get(name);
    }
}
